<?php if(!defined("PATH_HD"))exit;?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="http://localhost/meituan/mt/admin/tpl/css/product.css" rel="stylesheet" type="text/css" / >
<script src="http://localhost/meituan/mt/classlib/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
	$('#show').click(function(){
		$('.new_edit').css({zIndex:1001});
		$('.template_nav li').attr("class","");
		 $(this).attr("class","active");
	})
	$('#describe').click(function(){
		$('.new_edit').css({zIndex:-1001});
		$('.template_nav li').attr("class","");
		$(this).attr("class","active");
	})
	$("#btn").click(function(){
		
	})
	$("[name=edit_con]").val('aaa');
})	
</script>
</head>
<body>
<div class='content'>
	<div class='explain'>
		<h3>欢迎来到 你好,生活。</h3>
		<p>您现在正在使用编辑器功能,我们为您准备了一些模版，对其发布的栏目不同，选择与之对应的模版发布,可以获得比较完美的效果。</p>
	</div>
	<div class="con_submit">
		<div class="template_nav">
			<ul>
				<li class='active' id="show">
					<b></b>
					<h3><a href="javascript:;">商品展示编辑</a></h3>
					<b class='_b'></b>
				</li>
				<li id='describe'>
					<b></b>
					<h3><a href="javascript:;">商品描述编辑</a></h3>
					<b class='_b'></b>
				</li>
			</ul>
		</div>		
		<form action="http://localhost/meituan/index.php/admin/product/editor_upload" method="post" enctype="multipart/form-data">
			<div class='edit_template'>
				<div class='new_edit'>
					<table border=1 width=704 cellpadding=0 cellspacing=0>
						<tr>
							<th>请输入商品名称,商品名称在20字符以内。</th>
							<td><input style='font-size:16px;  font-weight:bold; text-indent:12px;' type="text" name="p_title" value=""></td>
							<td class='prompt'>超过规定字符</td>
						</tr>
						<tr>
							<th>请输入商品描述,商品描述在50字符以内。</th>
							<td><textarea  name="describe"></textarea></td>
							<td class='prompt'>超过规定字符</td>
					    </tr>
				    </table>
					<table style='float:left;' bjcolor='#FFF' class='price' border=1 width=230 cellpadding=0 cellspacing=0>
						<tr>
							<td>售价</td>
							<td><input type="text" name="price"></td>
					    </tr>
						<tr>
							<td>价值</td>
							<td><input type="text" name="costprice"></td>
						</tr>
						<tr>
							<td>节省</td>
							<td><input type="text" name="economize"></td>
						</tr>
						<tr>
							<td>折扣</td>
							<td><input type="text" name="rebate"></td>
					    </tr>
						<tr>
							<td>预定下架时间</td>
							<td><input type="text" name="economize"></td>
						</tr>
					
						<tr>
							<td>是否支持随时退款</td>
							<td ><input  type="radio" name="atanytime" value='1'>是<input type="radio" name="atanytime" value='2'>否</td>
					    </tr>
						<tr>
							<td>是否支持过期退款</td>
							<td ><input type="radio" name="pastdue" value='1'>是<input type="radio" name="pastdue" value='2'>否</td>
					    </tr>						
					</table>
					<table style='float:left;' class='price' border=1 width=473 cellpadding=0 cellspacing=0>
					<?php $swfupload_path="http://localhost/meituan/hdphp/org/swfupload250"?><?php $url="http://localhost/meituan/index.php/admin/product/swfupload"?><?php $delurl="http://localhost/meituan/index.php/admin/product/swfuploaddel"?><?php $size="1MB"?><?php $water_on="0"?><?php $upload_display_width="410px"?><?php $upload_display_height="200"?><?php $imagesize=""?><?php $swfupload_size="1000000"?><?php $limit="5"?><?php $text="图片上传"?><?php $dir=""?><?php $session_name="hdsid"?><?php $session_id="eebaarvasjs7s7d6pu7utadra5"?><?php $type="*.jpg;*.png;*.gif"?><?php $swfupload_id=isset($swfupload_id)?++$swfupload_id:0?><?php $input_hidden="upload[]"?><?php if($swfupload_id==0):?>
<link href='http://localhost/meituan/hdphp/org/swfupload250/css/default.css' rel='stylesheet' type='text/css' />
<script type='text/javascript' src='http://localhost/meituan/hdphp/org/swfupload250/js/handlers.js'></script>
<script type='text/javascript' src='http://localhost/meituan/hdphp/org/swfupload250/swfupload/swfupload.js'></script>
<script type='text/javascript' src='http://localhost/meituan/hdphp/org/swfupload250/swfupload/swfupload.queue.js'></script>
<script type='text/javascript' src='http://localhost/meituan/hdphp/org/swfupload250/js/fileprogress.js'></script>  
  <script type='text/javascript' src='http://localhost/meituan/hdphp/org/swfupload250/hd_set.js'></script>
<?php endif;?><script type="text/javascript">
            //向军  houdunwang.com  houdunwang@gmail.com
    if(typeof swfupload=='undefined'){
        swfupload_file=[];//记录添加或删除文件数据
    }
    $(function(){
        var swfu;
        var settings = {
            flash_url : '<?php echo $swfupload_path; ?>/swfupload/swfupload.swf',
            flash9_url : '<?php echo $swfupload_path; ?>/swfupload/swfupload_fp9.swf',
            upload_url: '<?php echo $url; ?>',
            post_params: {},//POST参数
            file_size_limit : '<?php echo $size; ?>',
            file_types : '<?php echo $type; ?>',
            file_types_description : 'Files:',
            file_upload_limit :<?php echo $limit; ?>,
            file_queue_limit : 0,
            custom_settings : {
                progressTarget : 'fsUploadProgress<?php echo $swfupload_id ?>',
                cancelButtonId : 'btnCancel'
            },
            debug: false,
            button_width: '110',
            button_height: '26',
            button_placeholder_id: 'spanButtonPlaceHolder',
            button_text: '<span class="theFont"><?php echo $text; ?></span>',
            button_text_style: '.theFont { display:block;font-size: 14;font-weight:bold;color:#ffffff; }',
            button_text_left_padding: 30,
            button_text_top_padding: 3,
            button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
            button_cursor: SWFUpload.CURSOR.HAND,
            swfupload_preload_handler : preLoad,
            swfupload_load_failed_handler : loadFailed,
            file_queued_handler : fileQueued,
            file_queue_error_handler : fileQueueError,
            file_dialog_complete_handler : fileDialogComplete,
            upload_start_handler : uploadStart,
            upload_progress_handler : uploadProgress,
            upload_error_handler : uploadError,
            upload_success_handler : uploadSuccess,
            upload_complete_handler : uploadComplete,
            queue_complete_handler : queueComplete	// Queue plugin event
        };
        settings.post_params['<?php echo $session_name; ?>']='<?php echo $session_id; ?>';
        settings.post_params['dir']='<?php echo $dir; ?>';
        settings.post_params['upload_display_width']='<?php echo $upload_display_width; ?>';
        settings.post_params['upload_display_height']='<?php echo $upload_display_height; ?>';
        settings.post_params['imagesize']='<?php echo $imagesize; ?>';
        //settings.post_params['thumbon1']='< ? php echo $thumbon; ? >';
        settings.post_params['swfupload_size']='<?php echo $swfupload_size; ?>';
        settings.post_params['water_on']='<?php echo $water_on; ?>';
        swfu = new SWFUpload(settings);
        var file_upload={
            "swfuobj":swfu,//上传对象
            "file_upload_limit":swfu.settings.file_upload_limit,//允许上传的总的文件数量，删除操作不会改变
            "file_allow_total":swfu.settings.file_upload_limit,//允许上传的总的文件数量,删除操作会改变
            "file_success_nums":0,//成功上传的文件数量
            "file_nums":0,//已经上传的文件数量，包括删除的文件
            "delurl":"<?php echo $delurl; ?>",
            "input_name":"<?php echo $input_hidden;?>"
        };
        swfupload_file.push(file_upload);
    })
</script>
            <!--上传显示DIV-->
        <div class='fieldset flash' id='fsUploadProgress<?php echo $swfupload_id;?>'>
        </div>

        <div class='swfupload_button'  href='javascript:;'>
            <span id='spanButtonPlaceHolder'></span>
            <i class='ico-btn ib-upload' style='position:absolute;left:10px;top:5px;'></i>
        </div>
        <div id='swfupload_message<?php echo $swfupload_id;?>'></div>
        <div  class='swfupload_file_show' id='swfupload_file_show<?php echo $swfupload_id;?>'>
        <?php if($swfupload_id==0):?>
            <div class='swfupload_input'></div>
            <?php endif;?>
            <ul></ul>
        </div>
        	   
					</table>					
				</div>
				<div class='edit_box'>
					<script type="text/javascript">HD_UEDITOR_ROOT="http://localhost/meituan/hdphp/org/ueditor/";</script><script type="text/javascript" src="http://localhost/meituan/hdphp/org/ueditor/editor_config.js"></script>
		<script type="text/javascript" src="http://localhost/meituan/hdphp/org/ueditor/editor_all.js"></script>
		<link rel="stylesheet" href="http://localhost/meituan/hdphp/org/ueditor/themes/default/ueditor.css"><script type="text/plain" name="edit_con" id="hd_ueditor699" 100%></script><script type="text/javascript" >var editorOption = {
                        autoFloatEnabled:false,
                         
                         imageUrl:"http://localhost/meituan/index.php/admin/product/ueditorupload",
                         imagePath:"",
                         fileUrl:"http://localhost/meituan/index.php/admin/product/ueditorupload",
                         filePath:"",
                         maximumWords:100,
                         minFrameHeight:300
                    };var editor = new baidu.editor.ui.Editor(editorOption);
                    editor.render("hd_ueditor699")</script>
				</div>
				<input class='submit' type='submit' value=''>	
				<input id="btn" type="button" value="测试">					
			</div>
		</form>
	</div>		
</div>		
</body>
</html>